import request from '@/utils/request';

// 获取标题信息
export function reqGetList() {
    return request({
        url: '/drug/title/get',
        method: 'get'
    })
}
// 删除标题信息
export function reqDelete(id) {
    return request({
        url: `/drug/title/delete/${id}`,
        method: 'delete'
    })
}

// 新增 || 修改

export function reqAddOrEdit(data) {
    if (data.id) {
        return request({
            url: '/drug/title/update',
            method: 'put',
            data
        })
    } else {
        return request({
            url: '/drug/title/add',
            method: 'post',
            data
        })
    }
}